package com.hymall.controller.admin;

import com.hymall.bean.common.BaseRespVo;
import com.hymall.bean.vo.DashboardVO;
import com.hymall.service.admin.DashboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 登录后首页显示数量功能
 * @Author 徐成喜
 * @Data 2022/7/16 15:20
 */
@RestController

public class AdminDashboardController {

    @Autowired
    DashboardService dashboardService;

/**
 * @description 实现查找表中数量并返回json
 * @return
 */
    @RequestMapping("admin/dashboard")
public BaseRespVo dashboard(){

       DashboardVO dashboardVO =  dashboardService.dashboard();

       return BaseRespVo.ok(dashboardVO);

    }
}
